package com.iknow.xmpp.util;

import org.jivesoftware.smack.packet.Presence;
import org.jivesoftware.smack.packet.Presence.Type;

public final class PresenceType
{
  public static final int AVAILABLE = 100;
  public static final int ERROR = 701;
  public static final int SUBSCRIBE = 300;
  public static final int SUBSCRIBED = 400;
  public static final int UNAVAILABLE = 200;
  public static final int UNSUBSCRIBE = 500;
  public static final int UNSUBSCRIBED = 600;

  public static int getPresenceType(Presence paramPresence)
  {
    int i;
    switch ($SWITCH_TABLE$org$jivesoftware$smack$packet$Presence$Type()[paramPresence.getType().ordinal()])
    {
    default:
      i = 701;
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
    case 6:
    }
    while (true)
    {
      while (true)
      {
        while (true)
        {
          while (true)
          {
            while (true)
            {
              while (true)
              {
                return i;
                i = 100;
              }
              i = 200;
            }
            i = 300;
          }
          i = 400;
        }
        i = 500;
      }
      i = 600;
    }
  }

  public static Presence.Type getPresenceTypeFrom(int paramInt)
  {
    Presence.Type localType;
    Object localObject;
    switch (paramInt)
    {
    default:
      localObject = null;
      return localObject;
    case 100:
      localType = Presence.Type.available;
    case 200:
    case 300:
    case 400:
    case 500:
    case 600:
    case 701:
    }
    while (true)
    {
      while (true)
      {
        while (true)
        {
          while (true)
          {
            while (true)
            {
              while (true)
              {
                while (true)
                  localObject = localType;
                localType = Presence.Type.unavailable;
              }
              localType = Presence.Type.subscribe;
            }
            localType = Presence.Type.subscribed;
          }
          localType = Presence.Type.unsubscribe;
        }
        localType = Presence.Type.unsubscribed;
      }
      localType = Presence.Type.error;
    }
  }
}